#include <stdio.h>
#include <stdlib.h>
#include "utils/utils.c"
#include "watermarking/watermarking.c"
#define NUMARGS 1

int main(int argc, string* argv) {
    if(!check_constraints(argc, argv)) return 0;
    
    //Open source image
    image source = open_image(argv[1]);
    printf("[%s] Source image's MD5 digest: %s.\n", timestamp(), source->md5sum);
    
    //Embed watermarking key
    image marked = embed(source, get_watermarking_key());
    save_image(marked);
    printf("[%s] Watermarked image's MD5 digest: %s.\n", timestamp(), marked->md5sum);
 
    return 0;
}
